
public class FormalParam {
	Type type;
	String id;
	
	public FormalParam ( Type type, String id){
		this.type = type;
		this.id = id;
	}
	public String toString(){
		String ret = "FormalParam ";
		
		String s = "";
		s += id;
		return ret+ s;
	}
	public void check() throws SemanticException {
		SymbolTable table = SymbolTable.getInstance();
		if (table.contains(id)) {
			throw new SemanticException("The identifier " + id + " has been used before");
		}
		table.add(new Entry(id, type));
	}
}
